|
|
|
|
|
|
|
Understanding the ActiveX EXE Project |
|
|
|
|
|
|
|
|
An ActiveX executable (EXE) is a component that at runtime exists in a process different from its client application. When a component runs in a different process from its client, the component is said to be an out-of-process component. This means that a method in the client's process can't use a pointer to the component's address space. This is because memory addressing for the client process is different from the component's process. When the component needs a foreign reference, underlying ActiveX mechanisms resolve the out-of-process referencing by copying the data for the memory reference into the component's address space. The memory reference to the client's data is replaced with a memory reference to the copy that resides in the component's address space. Figure 6.1 illustrates this process-to-process mapping. |
|
|
|
|
|
|
|
|
Figure 6.1.
ActiveX maps local in-process memory references to the component's
out-of-process space. |
|
|
|
|
|
|
|
|
To recap, before you create any ActiveX component, you must have a solid idea of what you want the component to do. That is, you need to determine each component's roles and responsibilities. Although creating ActiveX components in Visual Basic is relatively easy, the process still involves extra steps that warrant wise use of your design time. Component reuse involves more than reusing the same component code; it also means not performing the same component creation steps over and over again, unnecessarily. |
|
|
|
|
|
|
|
|
New Term: An out-of-process component runs in a process that is different from its client. That is, it runs in its own address space. |
|
|
|
|
|